package redis.clients.jedis;

/**
 * @author Han
 */
public class RedisContextHolder {
	public enum RedisOperationType{
		READ,
		WRITE
	}
	private static final ThreadLocal<RedisOperationType> contextHolder = new ThreadLocal<RedisOperationType>();
	
	public static void set(RedisOperationType operation) {
		contextHolder.set(operation);
	}

	public static RedisOperationType get() {
		return contextHolder.get();
	}

	public static void clear() {
		contextHolder.remove();
	}
}
